var _grid = $('#jgTable');

var _Data = [];
for(var i=0;i<10;i++){
    _Data.push({});
}

$(function(){
    _gridInit();
});

function _gridInit(){
    var _gridData = Object.create(gridData);
    _gridData.grid = $('#jgTable');
    _gridData.datatype = "local";
    _gridData.rowNum = '100';
    _gridData.colModel = [
        {label:'父物料代码', name:''},
        {label:'父物料描述', name:''},
        {label:'物料代码', name:''},
        {label:'物料描述', name:''},
        {label:'规格', name:''},
        {label:'数量', name:''},
        {label:'收货数量', name:''},
        {label:'不合格数量', name:''},
        {label:'不合格备注备注', name:''},
        {label:'不合格产品附件', name:''},
        {label:'订单数', name:''},
        {label:'收货要求', name:''},
        {label:'条码打印张数', name:''},
    ];
    _gridData.scroll = true;
    _gridData.height = '390px';
    _gridData.beforeRequest = function(){
        _gridData.grid.jqGrid("setGridParam", {
            data : _Data,
        });
    };
    _gridData.loadComplete = function(xhr){
        gridSize();
    };
    _gridData.multiselect = true;
    gridInit(_gridData);
}

//样式
function gridSize(){
    _grid.setGridWidth($('.u_toolbar').width());
}



